ys3 <- dunif(xs)
plot(xs,ys3,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='Another Possibility', ylim=c(0,3)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA)
lines(xs,ys3, , col=rgb(red=255, green=0, blue=0, alpha=150, max=255))
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist1.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=-4.5,to=4.5, by=.1)
ys <- dnorm(xs)
plot(xs,ys,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
, ylim=c(0,.45)
, xlab = ''
, ylab='', type='l'
, axes= FALSE
, main='One Possibility')
polygon(x=xs, y= ys , col=rgb(red=0, green=0, blue=255, alpha=150, max=255), border=NA)
#ys2 <- dnorm(xs, mean=0, sd=1.2)
#lines(xs,ys2, , col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
#polygon(x=xs, y= ys2 , col=rgb(red=255, green=0, blue=0, alpha=100, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist2.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=-4.5,to=4.5, by=.1)
ys <- dnorm(xs)
plot(xs,ys,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='One Possibility', ylim=c(0,.5)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=xs, y= ys , col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA)
ys2 <- dnorm(xs, mean=0, sd=1.2)
lines(xs,ys2, , col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
polygon(x=xs, y= ys2 , col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist3.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=0,to=1, by=.1)
ys3 <- dunif(xs)
plot(xs,ys3,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,2)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=0, green=0, blue=255, alpha=150, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist4.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=0,to=1, by=.1)
ys3 <- dunif(xs)
plot(xs,ys3,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='Another Possibility', ylim=c(0,2)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA)
lines(xs,ys3, , col=rgb(red=255, green=0, blue=0, alpha=150, max=255))
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA)
dev.off()
?dnorm
extremes <- c(rnorm(20, mean=-3, sd=1), rnorm(10, mean=-1.5, sd=3), rnorm(20), rnorm(30,mean=2, sd=1.3))
extremes
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,4.5)
, xlab = ''
, ylab='')
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,1)
, xlab = ''
, ylab='')
extremes <- c(rnorm(40, mean=-,4, sd=.7),rnorm(20, mean=-3, sd=1), rnorm(10, mean=-1.5, sd=3), rnorm(20), rnorm(30,mean=2, sd=1.3))
extremes <- c(rnorm(40, mean=-,4, sd=.7)
, rnorm(20, mean=-3, sd=1)
, rnorm(10, mean=-1.5, sd=3)
, rnorm(20)
, rnorm(30,mean=2, sd=1.3)
)
rnorm(40, mean=-,4, sd=.7)
extremes <- c(rnorm(40, mean=-4, sd=.7)
, rnorm(20, mean=-3, sd=1)
, rnorm(10, mean=-1.5, sd=3)
, rnorm(20)
, rnorm(30,mean=2, sd=1.3)
)
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,1)
, xlab = ''
, ylab='')
extremes <- c(rnorm(40, mean=-4, sd=.7)
, rnorm(20, mean=-3, sd=1)
, rnorm(10, mean=-1.5, sd=3)
, rnorm(20)
, rnorm(30,mean=2, sd=1.3)
, rnorm(60, mean=4, sd=.5))
par(mar=c(6,4,8,2))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,1)
, xlab = ''
, ylab='')
extremes <- c(rnorm(60, mean=-4, sd=.7)
, rnorm(20, mean=-3, sd=1)
, rnorm(10, mean=-1.5, sd=3)
, rnorm(20)
, rnorm(30,mean=2, sd=1.3)
, rnorm(60, mean=4, sd=.5))
par(mar=c(6,4,8,2))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,1)
, xlab = ''
, ylab='')
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(6,4,8,2))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,.4)
, xlab = ''
, ylab='')
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(6,4,8,2))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,.3)
, xlab = ''
, ylab='')
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,.3)
, xlab = ''
, ylab='')
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
judges <- rnorm(200)
judges <- rnorm(200)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.3)
, xlab = ''
, ylab=''
, axes=F)
judges <- rnorm(100)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.3)
, xlab = ''
, ylab=''
, axes=F)
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.5)
, xlab = ''
, ylab=''
, axes=F)
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.4)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='', ylim=c(0,.3)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.4)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
extremes
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
pdf('~/Desktop/CaseDist5.pdf',6,6)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dev.off()
pdf('~/Desktop/CaseDist5.pdf',6,6)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dev.off()
pdf('~/Desktop/CaseDist6.pdf',6,6)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
dev.off()
pdf('~/Desktop/CaseDist1.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=-4.5,to=4.5, by=.1)
ys <- dnorm(xs)
plot(xs,ys,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
, ylim=c(0,.45)
, xlab = ''
, ylab='', type='l'
, axes= FALSE
, main='One Possibility')
polygon(x=xs, y= ys , col=rgb(red=0, green=0, blue=255, alpha=150, max=255), border=NA)
#ys2 <- dnorm(xs, mean=0, sd=1.2)
#lines(xs,ys2, , col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
#polygon(x=xs, y= ys2 , col=rgb(red=255, green=0, blue=0, alpha=100, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist2.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=-4.5,to=4.5, by=.1)
ys <- dnorm(xs)
plot(xs,ys,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='One Possibility', ylim=c(0,.45)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=xs, y= ys , col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA)
ys2 <- dnorm(xs, mean=0, sd=1.2)
lines(xs,ys2, , col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
polygon(x=xs, y= ys2 , col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA)
dev.off()
extremes <- c(rnorm(60, mean=-4, sd=.7)
, rnorm(20, mean=-3, sd=1)
, rnorm(10, mean=-1.5, sd=3)
, rnorm(20)
, rnorm(30,mean=2, sd=1.3)
, rnorm(60, mean=4, sd=.5))
judges <- rnorm(100)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
xs
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-4.5,4.5)
, xlab = ''
, ylab=''
, axes=F
, xlim=c(-7,7))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-7,7)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-7,7)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
pdf('~/Desktop/CaseDist6.pdf',6,6)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-7,7)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dens <- density(extremes)
q25 <- quantile(extremes, .025)
q975 <- quantile(extremes, .975)
lines(dens ,col=rgb(red=255, green=0, blue=0, alpha=100, max=255))
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA))
dev.off()
pdf('~/Desktop/CaseDist5.pdf',6,6)
par(mar=c(1,1,2,1))
dens <- density(judges)
q25 <- quantile(judges, .025)
q975 <- quantile(judges, .975)
plot(dens ,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Another Possibility', ylim=c(0,.4), xlim=c(-7,7)
, xlab = ''
, ylab=''
, axes=F)
x1 <- min(which(dens$x == min(dens$x)))
x2 <- max(which(dens$x == max(dens$x)))
with(dens, polygon(x=c(x[c(x1,x1:x2,x2)]), y= c(0, y[x1:x2], 0)
, col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA))
dev.off()
pdf('~/Desktop/CaseDist3.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=0,to=1, by=.1)
ys3 <- dunif(xs)
plot(xs,ys3,col=rgb(red=0, green=0, blue=255, alpha=150, max=255),
main='Nick\'s Model', ylim=c(0,2)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=0, green=0, blue=255, alpha=150, max=255), border=NA)
dev.off()
pdf('~/Desktop/CaseDist4.pdf',6,6)
par(mar=c(1,1,2,1))
xs <- seq(from=0,to=1, by=.1)
ys3 <- dunif(xs)
plot(xs,ys3,col=rgb(red=0, green=0, blue=255, alpha=100, max=255),
main='Nick\'s Model', ylim=c(0,2)
, xlab = ''
, ylab='', type='l'
, axes= FALSE)
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=0, green=0, blue=255, alpha=100, max=255), border=NA)
lines(xs,ys3, , col=rgb(red=255, green=0, blue=0, alpha=150, max=255))
polygon(x=c(0,0,1,1), y= c(0,1,1,0) , col=rgb(red=255, green=0, blue=0, alpha=150, max=255), border=NA)
dev.off()
setwd('~/Dropbox/Shared Folders/Ben Lauderdale - Bayesian Vote Specific Ideal Points/Data/')
keyNumbers <- read.csv('KeyNumberData/SctHN.csv', stringsAsFactors=FALSE)
View(keyNumbers)
